package org.geeks.jredisbloom.controller;

import org.geeks.jredisbloom.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("book")
public class BookController {

    @Autowired
    private BookService bookService;

    @GetMapping("add")
    public Boolean add(String id) {
        bookService.add(id);

        return true;
    }

    @GetMapping("check")
    public Boolean check(String id) {
        return bookService.check(id);
    }
}
